home *** CD-ROM | disk | FTP | other *** search
- * Q B T X T M A C
- * Procedure to read a text file each line of which is
- * a series of macros to define how info should be printed
- * uses clipper file reading facilities and
- * Tom Rettig function atnext()
-
- PARAMETERS fname
- PRIVATE buffer, occ, opos, npos, macline
- X=REPLICATE("A",1)
- a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- X=SUBSTR(A,1,1)
- y = chr(32)
- buffer = memoread(fname)
- STORE 1 TO occ, opos, npos
- set print on
- DO WHILE .T.
- npos = atnext(chr(13),buffer,occ)
- IF npos=0
- EXIT
- ENDIF
- macline = substr(buffer,opos,npos-opos)
-
- IF substr(macline,1,1)<>"*"
- ? &macline
- ENDIF
- opos = npos + 2
- occ = occ + 1
- ENDDO
- set print off
- * eject
- RETURN
-